//
//  dynamicTableViewCell.m
//  QQ界面
//
//  Created by apple on 16/11/17.
//  Copyright © 2016年 LWB. All rights reserved.
//

#import "dynamicTableViewCell.h"
#import "dynamicModels.h"
#import "dynamicFrame.h"
@interface dynamicTableViewCell()
//文本
@property(nonatomic, weak)UILabel * text;
//头像image
@property(nonatomic, weak)UIImageView * imgView;
@end

@implementation dynamicTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
      UILabel * text1 = [[UILabel alloc]init];
        text1.font = [UIFont systemFontOfSize:18];
        [self.contentView addSubview:text1];
        self.text = text1;
        UIImageView * imgview1 = [[UIImageView alloc]init];
        [self.contentView addSubview:imgview1];
        _imgView = imgview1;
        
    }
    return self;
}
-(void)setDynam:(dynamicFrame *)dynam{
    _dynam=dynam;
    
    self.text.frame = dynam.textFrame;
    self.text.text = dynam.dynam.text;
    self.imgView.image = [UIImage imageNamed:dynam.dynam.imgView];
    self.imgView.frame = dynam.imgViewFrame;
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
